package com.amap.map.util.network;

import java.util.HashMap;
import java.util.Map;

import android.text.Html;

import com.amap.map.util.network.HttpConnectionUtil.HttpConnectionCallback;
import com.amap.map.util.network.HttpConnectionUtil.HttpMethod;

public class NetworkUtils {
	
	public static void runNetwork( ) {
		 //网址
        String url = "http://192.168.1.32:8080/diandeng/location/locationRecodeAction!locationRecode.action";
         
        if (!url.equals("http://") && !url.equals(""))
        {
            //自定义类,封装了GET/POST方法,而且同样也封装了同步跟异步的方法
            HttpConnectionUtil conn = new HttpConnectionUtil();
            Map<String, String> params = new HashMap<String, String>();
            params.put("verifyinfo", "my info");
            params.put("businessinfo", "location info");
            conn.asyncConnect(url,params, HttpMethod.POST,
                    new HttpConnectionCallback()
                    {

                        @Override
                        public void execute(String response)
                        {
                            //text.setText(Html.fromHtml(response));
                        }
                    });
        }

	}

}
